<?php
//include_once ('type.css.php');
//include_once ('colours.php');

define( 'LOREM', "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum" );			// cache this css page for a fortnight

$outputVars = array
( 
	'capitalise' => false,
	'print' => false,
	'p' => 18,
	'baseline' => 24,
	'textcol' => '111111',
	'linkcol' => 'aa3333',
	'max' => 96,
	'serif' => true
);					

// store get vars in this array
$domain = $_SERVER['HTTP_HOST'];			// find out the domain
$path = $_SERVER['SCRIPT_NAME'];			// find out the path to the current file
$queryString = $_SERVER['QUERY_STRING'];		// find out the QueryString
$url = "http://" . $domain . $path;			// put it all together

$parsed_url = parse_url( $url  .'?'. $queryString );	

if ( isset( $parsed_url['query'] ) )
{
	$url_query = $parsed_url['query'];
	parse_str($url_query, $fields);
	
	// transfer each query to the defaults
	foreach ($fields as $key => $val)
	{
	  $outputVars[ $key ] = $val;
	}
}


function createURL()
{
  global $url, $outputVars;
  return $url . '?' . http_build_query($outputVars);
}
function toggleFieldAndReturnURL( $key )
{
  global $url, $outputVars;
  $out = $outputVars;
  if (!$outputVars[ $key ]) $out[ $key ] = true;
  else $out[ $key ] = false;
  return $url . '?' . http_build_query($out);
}
function setFieldAndReturnQuery( $key, $value )
{
  global $outputVars;
  $out = $outputVars;
  $out[ $key ] = $value;
  return http_build_query($out);
}

function setFieldAndReturnURL( $key, $value )
{
  global $url;
  return $url . '?' . setFieldAndReturnQuery( $key, $value );
}

// FOR PHP 4 and less we need to implement this function :(
if (!function_exists('http_build_query')) 
{
  function http_build_query($formdata, $numeric_prefix = "", $seperator="&")
  {
      $arr = array();
      foreach ($formdata as $key => $val) $arr[] = $numeric_prefix.$key."=".$val;
      return implode($arr, $seperator);
  }
}

function colourLine( $height, $blocks=256 )
{
	// This is a nice colour strip!
	$colourStrip = "<ul style='clear:both'>";
	$width = (100/$blocks);
	$steps = ($blocks-1)/255;
	$R = 0;
	$G = 0;
	$B = 0;
	for ($i=0; $i < $blocks; $i++) 
	{
		$B = $B + 1;//$steps;
		$colour = 0xffffff * $i/$blocks; 
		$colour = ((($R << 8) | $G) << 8) | $B;
		$colourStrip .= "<li><a href='";
		$colourStrip .= setFieldAndReturnURL('textcol', $colour );
		$colourStrip .= "' style='";
		$colourStrip .= "background-color:#".$colour.";float:left;display:block;height:"."25"."px;width:".$width."%";
		$colourStrip .= "'></a></li>";
		
		
	}
	$colourStrip .= "</ul>";
	echo $colourStrip;
	return $colourStrip;
}

/* ========================================================================================= */

?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<title>&equiv;CSS BASSLINES &rarr; <?php echo $outputVars['baseline']; ?>px &equiv;</title>
	<meta name="description" content="Test page for CSS Basslines, a typographic style sheet">
	<meta name="author" content="designerzen">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

	<!-- Style Sheets : -->
	<!-- Reset & Typography -->
	<link rel="stylesheet" type="text/css" href="css/type.css.php?<?php echo htmlentities($queryString); ?>" media="screen" /> 
	<link rel="stylesheet" type="text/css" href="css/type.css.php?<?php echo htmlentities($queryString); ?>" media="print" /> 
	<!-- Simple Layout -->
	<link rel="stylesheet" type="text/css" href="css/layout.css.php?<?php echo htmlentities($queryString); ?>" media="screen" /> 
	<!-- Buttons, Inputs and gadgets -->
	<link rel="stylesheet" type="text/css" href="css/gadget.css.php?<?php echo htmlentities($queryString); ?>" media="screen" /> 
	<!--[if lt IE 9]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
</head>

<body>
<div id='wrapper' class='flexible_width centred top-margin'>
<div id='content'>

<header>
	<!-- Titles -->
	<hgroup class="text-centre">
		<h1>CSS <sub>Bass</sub>lines &equiv;</h1>
		<h2><strong><u>Rythmic</u> Balanced Typography</strong></h2>
		<h4>Create <em>valid</em> <a href="css/type.css.php?<?php echo htmlentities($queryString); ?>">CSS</a> for <strong>all</strong> your projects and enjoy instant harmonic perfection</h4>
	</hgroup>
	<!--- Download Code Buttons --->
	<ol class='sticky-header bg_white'>
		<li class='column_halves text-left group'>
			<a class="download" alt="regular css" href="css/type.css.php?<?php echo $queryString; ?>"> &equiv; <em>CSS CODE</em> HERE &darr; </a>
		</li>
		<li class='column_halves end text-right'>
			<a class="download" alt="minified css code" href="css/type.css.php?<?php echo setFieldAndReturnQuery( 'deploy', 1 ); ?>"> &darr; <em>CSS DEPLOY READY CODE</em> HERE [minified] &equiv; </a>
		</li>
	</ol>
</header>

<!-- Introduction -->
<div class='group'>
  <article id='intro' class='column_halves text-left'>
	<p class="dropCaps">By simply embedding the <a href="<?php echo setFieldAndReturnURL('deploy', true ); ?>">type.css</a> file as the first CSS call in the header of your webpage, you automatically reset and normalize the presentation of HTML elements and text. The process creates a <i>perfectly useable style sheet</i> that will <i><strong>look good</strong> at any size</i> and beautifully sit on any horizontal grid (&equiv;).</p>
	<p>Just add your own layout css, add the <code>'deploy=1'</code> flag and you are ready for production ready code.</p>
	
	<p>Typography is handled <i>internally</i> so that all text should be easy to read - <em>even at the smallest sizes</em> - and sticks to the specified baseline in a measured vertical rythmn.
	<strong>Kerning and Leading</strong> is added to all small fonts and large ones get margins so that every thing balances nicely. 
	The <strong>current baseline</strong> is set at <strong><?php echo $outputVars['baseline'] ?> pixels</strong> and the <em>source code CSS</em> can be viewed <a href="type.css.php?<?php echo $queryString ?>">here</a>. </p>
	   
	<p>The idea for this script came from various sources, most notably <a href="http://webtypography.net/">webtypography.net</a>, and <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">css reset</a> by Eric Meyer. 
	Its main goal is to ensure that web principles for good typography are followed automatically for all type sizes, and that all elements flow rhythmically along an invisible vertical grid. </p>
	
	<p>Almost all elements are affected by the CSS, from <em>H1</em> through <em>H6</em>, to more obscure elements such as <em>ABBR</em> and <em>KBD</em> - each is reset so as to remove any existing styles imposed by certain browsers.
	All code is fully cross platform and complies with <a href="http://validator.w3.org/check/referer">W3C</a> standards for web accessibilty. </p>
	
	<blockquote cite="Robert Bringhurst">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</blockquote>
	
 </article>

  <!-- Current Config -->
  <div id='settings' class='column_halves end text-right'>
  	
  	<hr />
  	<h5><em>This page</em> represents how the css looks with a <strong><?php echo $outputVars['baseline']; ?> pixel baseline,</strong><br />
     a modular scale of <strong><?php echo $outputVars['scale']; ?></strong><br />
     with main text set at <strong><?php echo $outputVars['p']; ?></strong> points, <br />
     in <strong><?php echo (!!$outputVars['reset']) ? 'reset' : 'normalise'; ?> mode.</strong></h5>
    <hr /><!-- Index -->
	
	  <h3>Index :</h3>
	  <ol>
	  	<li><a alt="A step by step guide to configuration" href="#wizard">Wizard</a></li> 
	  	<li>
	  		<a href="#config">Options</a>
	    	<ol>
	    		<li><a href="#modereset">Reset or Normalise</a></li>
	    		<li><a href="#modefont">Font</a></li>
			    <li><a href="#modescales">Sizes</a></li>
			    <li><a href="#modefontcolours">Long Headlines</a></li>
			    <li><a href="#step4">Text-level markup</a></li>
			    <li><a href="#step5">Fiddle</a></li>
		    </ol>
	  	</li>
	    <li><a href="#usage">Usage</a></li> 
	    <li><a href="#deploy">Deployment Instructions</a></li> 
	    <li><a href="#demo">Demonstration</a></li>
	    <li>
	    	<ol>
	    		<li><a href="#test">Test Suite with multiple Elements</a></li>
			    <li><a href="#text">Text-level markup</a></li>
			    <li><a href="#other">Other Elements</a></li>
			    <li><a href="#demo">Long Headlines</a></li>
			    
		    </ol>
	    </li>
	  </ol>
	  
	<?php /**/ ?>
	<ol>
		<h4>Now Get Creative :P</h4>
	    <li>CSS Code &#8227; <a class="download" href="type.css.php?<?php echo $queryString ?>">type.css</a> <a class="download" alt="minified css code" href="css/type.css.php?<?php echo setFieldAndReturnQuery( 'deploy', 1 ); ?>"> (minified)</a></li>
		<li>More Information &#8227; <a href="http://basslines.designerzen.co.uk">designerzen</a></li>
		<li>Download PHP Source Code &#8227; <a href="https://code.google.com/p/css-dynamic-typographic-php/">Google Code Repository</a></li>
	</ol>

  </div>

</div>

<hr />


<a id="config"></a>

<!-- Configuration -->
<ol id="wizard" class='options group accordian'>
	<h1>Wizard</h1>
		
	<li id="modereset">
		<h2>Reset or Normalise?</h2>
		<h4>Currently you are looking at a <em><?php echo (!!$outputVars['reset']) ? 'reset' : 'normalised'; ?></em> page</h4>
		<ul class="group">
		    <!-- Normalise or Reset -->
		    <li>
		    	<a href="<?php echo setFieldAndReturnURL('reset','1'); ?>#modereset">Resets all elements leaving just a <strong>bare skeleton</strong></a>
		    </li>
		    <li>
		   		<a href="<?php echo setFieldAndReturnURL('reset','0'); ?>#modereset"><strong>Normalise</strong> the most used elements <strong>ready to be deployed</strong></a>
		   	</li>
	  		
		</ul>
	</li>
	
	<li id="modefont">
		<h2>Select a font</h2>
		<h4>This should represent the characteristics of what you are trying to portray</h4>
		<!-- Fonts -->
		<div id="font_families" class='group'>
			
	
		  	<ul class="column_thirds text-centre circle">
			<!-- Sans Serif Font Families -->
			    <h6 style="font-family:sans-serif;">Sans Serif</h6>
			    <!-- Arial -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'arial' ); ?>#modefont">Arial</a></li>
			    <!-- Arial Black -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Arial Black', 'Arial Bold', Gadget, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'arialblack' ); ?>#modefont">Arial Black</a></li>
			    <!-- Arial Narrow -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Arial Narrow', Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'arialnarrow' ); ?>#modefont">Arial Narrow</a></li>
			    <!-- Arial Rounded -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'arialrounded' ); ?>#modefont">Arial Narrow</a></li>
			    <!-- Avant Garde -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Avant Garde', Avantgarde, 'Century Gothic', CenturyGothic, 'AppleGothic', sans-serif" href="<?php echo setFieldAndReturnURL('font', 'avantgarde' ); ?>#modefont">Avant Garde</a></li>	    
			    <!-- Calibri -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'calibri' ); ?>#modefont">Calibri</a></li>		    
			    <!-- Candara -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Candara, Calibri, Segoe, 'Segoe UI', Optima, Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'candara' ); ?>#modefont">Candara</a></li>	
			    <!-- Century Gothic -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Century Gothic', CenturyGothic, 'AppleGothic', sans-serif" href="<?php echo setFieldAndReturnURL('font', 'centurygothic' ); ?>#modefont">Century Gothic</a></li>	    
			    <!-- Franklin Gothic Medium -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Franklin Gothic Medium', Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'franklingothicmedium' ); ?>#modefont">Franklin Gothic Medium</a></li>	
			    <!-- Frutiger -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Frutiger, 'Frutiger Linotype', Univers, Calibri, 'Gill Sans', 'Gill Sans MT', 'Myriad Pro', Myriad, 'DejaVu Sans Condensed', 'Liberation Sans', 'Nimbus Sans L', Tahoma, Geneva, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'frutiger' ); ?>#modefont">Frutiger</a></li>	
			    <!-- Futura -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Futura, 'Trebuchet MS', Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'futura' ); ?>#modefont">Futura</a></li>	
			    <!-- Geneva -->
				<li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Geneva, Tahoma, Verdana, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'geneva' ); ?>#modefont">Geneva</a></li>	
				<!-- Gill Sans -->
				<li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Gill Sans', 'Gill Sans MT', Calibri, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'gillsans' ); ?>#modefont">Gill Sans</a></li>
			    <!-- Helvetica -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'helvetica' ); ?>#modefont">Helvetica</a></li>
			    <!-- Impact -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Impact, Haettenschweiler, 'Franklin Gothic Bold', Charcoal, 'Helvetica Inserat', 'Bitstream Vera Sans Bold', 'Arial Black', sans serif" href="<?php echo setFieldAndReturnURL('font', 'impact' ); ?>#modefont">Impact</a></li>
			    <!-- Lucida Grande -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Geneva, Verdana, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'lucidagrande' ); ?>#modefont">Lucida Grande</a></li>
			    <!-- Optima -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Optima, Segoe, 'Segoe UI', Candara, Calibri, Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'optima' ); ?>#modefont">Optima</a></li>
			    <!-- Segoe -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Segoe, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'segoe' ); ?>#modefont">Segoe</a></li>   
			    <!-- Tahoma -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Tahoma, Verdana, Segoe, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'tahoma' ); ?>#modefont">Tahoma</a></li>   
			    <!-- Trebuchet -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'trebuchet' ); ?>#modefont">Trebuchet</a></li>   
			    <!-- Verdana -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Verdana, Geneva, sans-serif" href="<?php echo setFieldAndReturnURL('font', 'verdana' ); ?>#modefont">Verdana</a></li>  
			    <!-- Padding to make an equal amount of entries -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden">&nbsp;</li>  
			 </ul>
			 <ul class="column_thirds text-centre disc">
			 <!-- Serif Font Families -->
			    <h6 style="font-family:sans;">Serif</h6>
			    <!-- Adobe Caslon Pro -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Adobe Caslon Pro', Baskerville, Georgia, Palatino, 'Times New Roman', Times, serif" href="<?php echo setFieldAndReturnURL('font', 'adobecaslonpro' ); ?>#modefont">Adobe Caslon Pro</a></li>   
			    <!-- Baskerville -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Baskerville, 'Baskerville old face', 'Hoefler Text', Garamond, 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'baskerville' ); ?>#modefont">Baskerville</a></li>  
			    <!-- Big Caslon -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Big Caslon', 'Book Antiqua', 'Palatino Linotype', Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'bigcaslon' ); ?>#modefont">Big Caslon</a></li>
			    <!-- Bodoni MT -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="=font-family:'Bodoni MT', Didot, 'Didot LT STD', 'Hoefler Text', Garamond, 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'bodoni' ); ?>#modefont">Bodoni MT</a></li>
			    <!-- Book Antiqua -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Book Antiqua', Palatino, 'Palatino Linotype', 'Palatino LT STD', Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'bookantiqua' ); ?>#modefont">Book Antiqua</a></li>
			    <!-- Calisto MT -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Calisto MT', 'Bookman Old Style', Bookman, 'Goudy Old Style', Garamond, 'Hoefler Text', 'Bitstream Charter', Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'calistomt' ); ?>#modefont">Calisto MT</a></li>
			    <!-- Cambria -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Cambria, Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'cambria' ); ?>#modefont">Cambria</a></li>
			    <!-- Didot -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Didot, 'Didot LT STD', 'Hoefler Text', Garamond, 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'didot' ); ?>#modefont">Didot</a></li>
			    <!-- Garamond -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Garamond, Baskerville, 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'garamond' ); ?>#modefont">Garamond</a></li>
			    <!-- Goudy Old Style -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Goudy Old Style', Garamond, 'Big Caslon', 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'goudyoldstyle' ); ?>#modefont">Goudy Old Style</a></li>
			    <!-- Hoefler Text -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Hoefler Text', 'Baskerville old face', Garamond, 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'hoeflertext' ); ?>#modefont">Hoefler Text</a></li>
			    <!-- Lucida Bright -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Lucida Bright', Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'lucidabright' ); ?>#modefont">Lucida Bright</a></li>
			    <!-- Palatino -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Palatino, 'Palatino Linotype', 'Palatino LT STD', 'Book Antiqua', Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'palatino' ); ?>#modefont">Palatino</a></li>
			    <!-- Perpetua -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Perpetua, Baskerville, 'Big Caslon', 'Palatino Linotype', Palatino, 'URW Palladio L', 'Nimbus Roman No9 L', serif" href="<?php echo setFieldAndReturnURL('font', 'perpetua' ); ?>#modefont">Perpetua</a></li>
			    <!-- Times New Roman -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:TimesNewRoman, 'Times New Roman', Times, Baskerville, Georgia, serif" href="<?php echo setFieldAndReturnURL('font', 'timesnewroman' ); ?>#modefont">Palatino</a></li>
			<!-- Slab Serif Font Families -->
			    <h6>Slab Serif</h6>
			    <!-- Rockwell -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Rockwell, 'Courier Bold', Courier, Georgia, Times, 'Times New Roman', serif" href="<?php echo setFieldAndReturnURL('font', 'rockwell' ); ?>#modefont">Rockwell Extra Bold</a></li>
			    <!-- Rockwell Extra Bold -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:Rockwell Extra Bold, Rockwell Bold, monospace" href="<?php echo setFieldAndReturnURL('font', 'rockwellextrabold' ); ?>#modefont">Rockwell Extra Bold</a></li>
			</ul>
			<ul class="column_thirds final text-centre disc">
			<!-- Monospaced Font Families -->
			    <h6 style="font-family:monospace;">Monospaced</h6>
			    <!-- Andale Mono -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Andale Mono', AndaleMono, monospace" href="<?php echo setFieldAndReturnURL('font', 'andalemono' ); ?>#modefont">Andale Mono</a></li>
			    <!-- Consolas -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'consolas, monaco, monospace" href="<?php echo setFieldAndReturnURL('font', 'consolas' ); ?>#modefont">Consolas</a></li>
			    <!-- Courier New -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace" href="<?php echo setFieldAndReturnURL('font', 'couriernew' ); ?>#modefont">Courier New</a></li>
			    <!-- Lucida Console -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:'Lucida Console', 'Lucida Sans Typewriter', Monaco, 'Bitstream Vera Sans Mono', monospace" href="<?php echo setFieldAndReturnURL('font', 'ludicaconsole' ); ?>#modefont">Lucida Console</a></li>
			    <!-- Monaco -->
			    <li style="height:<?php echo 1.5*$outputVars['baseline'];?>px;display:block;overflow:hidden"><a style="font-family:monaco, consolas, 'Lucida Console', monospace" href="<?php echo setFieldAndReturnURL('font', 'monaco' ); ?>#modefont">Monaco</a></li>
			</ul>
		</div>
	</li>
	
	
	<li id="modescales">
		<h2>Set Baseline &amp; Scale Type</h2>
		<h4>Select the size for the baseline that travels rhythmnically up and down, holding content on every beat - Currently set at <strong><?php echo $outputVars['baseline']; ?>px</strong></h4>
		<div id="text_sizes" class="group">
			
		  	<ol class="column_halves">
				<!-- Set Baseline Size -->
				<h6><?php echo $outputVars['baseline']; ?>px Baseline</h6>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', $outputVars['baseline']+1); ?>#modescales">▲ Increase Baseline to <?php echo $outputVars['baseline']+1; ?> pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', $outputVars['baseline']-1); ?>#modescales">▼ Decrease Baseline to <?php echo $outputVars['baseline']-1; ?> pixels</a></li>
				<!--
				<form method="get" action="<?php echo createURL();?>#modescales">
				  <input type="range" min="0" max="48" step="1" name="baseline" value="<?php echo $outputVars['baseline']; ?>#modescales">
				  <input type="submit" class="submit" value="Submit">
				</form>
				-->
				<h6>Predefined Base Line Sizes</h6>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 14); ?>#modescales">14 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 16); ?>#modescales">16 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 18); ?>#modescales">18 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 20); ?>#modescales">20 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 22); ?>#modescales">22 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 24); ?>#modescales">24 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 26); ?>#modescales">26 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 32); ?>#modescales">32 pixels</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('baseline', 48); ?>#modescales">48 pixels</a></li>
				
			</ol>
			
			<ol class="column_halves final">
				<!-- Set Scaling type -->
				<h6>Scale Type</h6>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'phi'); ?>#modescales">PHI</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'invphi'); ?>#modescales">1 &frasl; PHI</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'pi'); ?>#modescales">PI</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'fourth'); ?>#modescales">Perfect Fourth</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'fifth'); ?>#modescales">Perfect Fifth</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('scale', 'linear'); ?>#modescales">Linear</a></li>
				
			</ol>
		</div>
	</li>
	
	<li id="modefontsizes">
		<h2>Change Font Sizes</h2>
		<h4>Adjust these values to make this text as easy to read as possible</h4>
		<ol>
			<!-- Paragraph Sizes -->
			<h6><?php echo $outputVars['p']; ?>px Paragraph Size <a href="<?php echo setFieldAndReturnURL('p', ($outputVars['p']+1) ); ?>#modefontsizes">▲</a><a href="<?php echo setFieldAndReturnURL('p', ($outputVars['p']-1) ); ?>#modefontsizes">▼</a></h6>
			<li><a href="<?php echo setFieldAndReturnURL('p', ($outputVars['p']+1) ); ?>#modefontsizes">▲ Increase Paragraph Size by 1 to <?php echo $outputVars['p']+1; ?> points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', ($outputVars['p']-1) ); ?>#modefontsizes">▼ Decrease Paragraph Size by 1 to <?php echo $outputVars['p']-1; ?> points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 9 ); ?>#modefontsizes">9 points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 12 ); ?>#modefontsizes">12 points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 16 ); ?>#modefontsizes">16 points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 18 ); ?>#modefontsizes">18 points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 20 ); ?>#modefontsizes">20 points</a></li>
			<li><a href="<?php echo setFieldAndReturnURL('p', 22 ); ?>#modefontsizes">22 points</a></li>	
			<li><a href="<?php echo setFieldAndReturnURL('p', 24 ); ?>#modefontsizes">24 points</a></li>	
			<li><a href="<?php echo setFieldAndReturnURL('p', 26 ); ?>#modefontsizes">26 points</a></li>	
		</ol>
	</li>
	
	<li id="modefontcolours">
	
		<h2>Choose Colours</h2>
		<h4>Adjust the colours of your main text and links
		Choose values that are <em>easy on the eyes</em> and <strong>stand out</strong></h4>
		<div id="text_colours" class="group">
	
			<ol class="column_thirds">
			    <h6>Text Colour</h6>
			    <li><a style="color:#000000" href="<?php echo setFieldAndReturnURL('textcol', '000000' ); ?>#modefontcolours">◼ Black Text</a></li>
			    <li><a style="color:#090105" href="<?php echo setFieldAndReturnURL('textcol', '090105' ); ?>#modefontcolours">◼ Brown Text</a></li>
			    <li><a style="color:#333333" href="<?php echo setFieldAndReturnURL('textcol', '333333' ); ?>#modefontcolours">◼ Dark Text</a></li>
			    <li><a style="color:#9a9a9a" href="<?php echo setFieldAndReturnURL('textcol', '9a9a9a' ); ?>#modefontcolours">◼ Grey Text</a></li>
			    <li><a style="color:#ffffff" href="<?php echo setFieldAndReturnURL('textcol', 'ffffff' ); ?>#modefontcolours">◼ White Text</a></li>
				<?php colourLine( $outputVars['baseline'] ); ?>
				<?php echo "Ta-da!"; ?>
				<h6>Link Colour</h6>
			    <li><a href="<?php echo setFieldAndReturnURL('linkcol', 'FF0000' ); ?>#modefontcolours">◼ Red Links</a></li>
			    <li><a href="<?php echo setFieldAndReturnURL('linkcol', '00AA00' ); ?>#modefontcolours">◼ Green Links</a></li>
			    <li><a href="<?php echo setFieldAndReturnURL('linkcol', '0000AA' ); ?>#modefontcolours">◼ Blue Links</a></li>
			</ol>	
			
			<ol class="column_thirds">
				<h6>Custom Colours</h6>
			    <form method="get" action="<?php echo createURL();?>#modefontcolours">
			    	<!-- xHtml / html5 -->
			      <li><label for="textcol">Text Colour</label><input type="text" size="10" maxlength="8" name="textcol" value="<?php echo $outputVars['textcol']; ?>" ><input type='color' name="textcol" value="#<?php echo $outputVars['textcol']; ?>" ></li>
			      <li><label for="linkcol">Links Colour</label><input type="text" size="10" maxlength="8" name="linkcol" value="<?php echo $outputVars['linkcol']; ?>" ><input type='color' name="linkcol" value="#<?php echo $outputVars['linkcol']; ?>" ></li>
			      <li><input type="submit" value="Update"></li>
			    </form>
			
			    <li>You can use <strong>Hex</strong> or comma seperated <strong>RGB Values</strong>!</li>
			</ol>
			
			<ol class="column_thirds final">      
				<!-- Underline Links -->
			    <h6>Link Underline</h6>
			    <li><a href="<?php echo setFieldAndReturnURL('underline', 1 ); ?>#step5">Underline <strong>all</strong> links</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('underline', 0 ); ?>#step5"><strong>Remove</strong> underline from all links entirely</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('underline', 'hover' ); ?>#step5">Show underline when <strong>hovering</strong> over links</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('underline', 'border' ); ?>#step5">Show underline using <strong>border</strong></a></li>
				<li><a href="<?php echo setFieldAndReturnURL('underline', 'invert' ); ?>#step5"><strong>Invert</strong> the link so that it has a background</a></li>
				
			</ol>	
		  </div>
	</li>
	
	<li>
		<h2 id="step4">Adjust Headlines</h2>
		<h4>Resize the headlines and set the scale type for variations</h4>
		
		<!-- Capitalise Headings -->
		<?php if ( !$outputVars['capitalise']) : ?>
			<p>For more impact, you can also set them to be <a href="<?php echo toggleFieldAndReturnURL('capitalise'); ?>">CAPITALISED</a></p>
		<?php else: ?>
			<p>You currently have CAPITALISED headlines, but you can also set them to be in <a href="<?php echo toggleFieldAndReturnURL('capitalise'); ?>">regular case</a></p>
		<?php endif; ?>
		
		<div id="headline_sizes" class="group"> 	
			<ol class="column_halves">
				<h6>Maximum Font H1 Size</h6>
			
			    <!-- Max Sizes -->
			    <li><a href="<?php echo setFieldAndReturnURL('max', ($outputVars['max']+1) ); ?>#step4">▲ Increase Maximum Font Size by 1 (to <?php echo $outputVars['max']+1 ?> points)</a></li>
			    <li><a href="<?php echo setFieldAndReturnURL('max', ($outputVars['max']-1) ); ?>#step4">▼ Decrease Maximum Font Size by 1 (to <?php echo $outputVars['max']-1 ?> points)</a></li>
			    <li><a href="<?php echo setFieldAndReturnURL('max', ($outputVars['max']+10) ); ?>#step4">▲ Increase Maximum Font Size by 10 (to <?php echo $outputVars['max']+10; ?> points)</a></li>
			    <li><a href="<?php echo setFieldAndReturnURL('max', ($outputVars['max']-10) ); ?>#step4">▼ Decrease Maximum Font Size by 10 (to <?php echo $outputVars['max']-10; ?> points)</a></li>
			</ol>
			
			<ol class="column_halves final">
			    <!-- Max Size Shortcuts -->
			    <h6>H1 Size</h6>
				<li><a href="<?php echo setFieldAndReturnURL('max', 22 ); ?>#step4">22 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 24 ); ?>#step4">24 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 26 ); ?>#step4">26 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 28 ); ?>#step4">28 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 32 ); ?>#step4">32 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 36 ); ?>#step4">36 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 40 ); ?>#step4">40 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 48 ); ?>#step4">48 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 56 ); ?>#step4">56 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 64 ); ?>#step4">64 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 72 ); ?>#step4">72 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 84 ); ?>#step4">84 points</a></li>
				<li><a href="<?php echo setFieldAndReturnURL('max', 96 ); ?>#step4">96 points</a></li>
			</ol>
			
			
		</div>	
	</li>
	
	<li>
		
		<h2 id="step5">Fiddle</h2>
		<h4>Because tweaking is for winners and fiddling feels good</h4>
		<div id="tweak" class="group"> 	
			
		</div>
		
	</li>
	
	
	<li>
		<h2 id="step5">Deploy</h2>
		<h4>Different ways to set up your system</h4>
		<div id="deployment" class="group"> 	
			<ul class="column">
				<h5>Print  Options</h5>
			    	
			    <!-- Print Mode -->
			    <li>
			    	<a href="<?php echo toggleFieldAndReturnURL('print'); ?>#step5">Convert the entire stylesheet into <strong>Print Ready Mode</strong></a>
					<div class="label">code:</div>
					<code class="html">
<?php echo htmlentities( '<link rel="stylesheet" type="text/css" href="css/type.css.php?print=1" media="print">' ); ?>
			    	</code>
			    </li>
			   
			   	<!-- Embedded Print variation -->
			    <li>
			    	<a href="<?php echo setFieldAndReturnURL('print','embed'); ?>#step5">Embed a "print" specific that <strong>only shows up when printed</strong></a>
			   		<div class="label">code:</div>
			   		<code class="html">
<?php echo htmlentities( '<link rel="stylesheet" type="text/css" href="css/type.css.php?print=embed" media="screen">' ); ?>
			    	</code>
			    </li>
			     <!-- Mobile variations -->
			    <h5>Mobile Options</h5>	
			   	<li>
			    	<a href="<?php echo setFieldAndReturnURL('mobile','embed'); ?>#step5">Embed "mobile" variations into your CSS that <strong>alters text sizes dependent on screen size</strong></a>
					<div class="label">code:</div>
					<code class="html">
<?php echo htmlentities( '<link rel="stylesheet" type="text/css" href="css/type.css.php?mobile=embed" media="screen">' ); ?>
			    	</code>
			    </li>		   
			   	<li>
			    	<a href="<?php echo setFieldAndReturnURL('mobile','1'); ?>#step5">Restrict the values so that it will work on any screen size</a>
					<div class="label">code:</div>
					<code class="html">
<?php echo htmlentities( '<link rel="stylesheet" type="text/css" href="css/type.css.php?mobile=1" media="screen">' ); ?>
			    	</code>
			    </li>
			    <h5>Advanced Usage</h5>	
			    <li>
			    	<p>Dynamically added css via javascript</p>
			    	<div class="label">code:</div>
			    	<code class="js">
<?php echo htmlentities( 
	"var css = 'small.css';" . 
	"\nif (window.innerWidth > 640) css='large.css';" .
	"\nelse if (window.innerWidth >= 320) css = 'medium.css';" .
	"\ndocument.write('" .
	'<link type="stylesheet" rel="stylesheet" href="' .
	" +css+ " . "'" .
	'"' . "/>'");
?>
			    	</code>
			    </li>
			</ul>
		</div>
	</li>
</div>

<hr />

<h2>Examples : </h2>
<h4>The top few are wild variations, the asterisked<sup>*</sup> others are deploy ready</h4>
<div class='column_two_thirds'>
  <ol>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?baseline=22&textcol=10,10,100&linkcol=990000&max=96&p=14">Red Links, Blue Text (set as individual RGB colours), Maximum font size is 96 points, baseline set at 22 pixels, paragraph set to 14pts</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?baseline=22&textcol=0000FF&linkcol=990000&max=96&capitalise=true">Red Links, Blue Text, Maximum font size is 96 points, baseline set at 22 pixels, Headlines in Capitals</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?baseline=18&textcol=60,60,0&linkcol=ff0000&max=72">Red Links, Brown Text (set as individual RGB colours), Maximum font size is 72 points, baseline set at 18 pixels</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?baseline=22&capitalise=true&linkcol=0,0,255&max=46&min=4">Blue Links, Maximum font size is 46 points, Minimum is 4 points, baseline set at 22 pixels, Headlines are in capitals</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?baseline=34&textcol=0,10,0&linkcol=0,255,0&h1=56&p=18">Green Links, H1 set as 56 points, p set to 18 points, baseline set at 34 pixels</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?h1=100&h2=90&h3=80&h4=40&h5=30&h6=20&blockquote=24&textcol=0,0,110">Blue Text, H1 set at 100 points, H2 set at 90 points, H3 set at 80 points, H2 set at 40 points, blockquote set at 24points</a>
    </li>
    <li>
      <a alt="example configuration" class="example" href="<?php echo $url ?>?zoom=200">Double size defaults</a>
    </li>
  </ol>

</div>

 <hr />

<!-- Demo with actual content -->
  <a id="demo"></a>
  <h1>Demonstration </h1>

  <h6>Here lies a moderate collection of html elements laid out in a typical format.</h6> 

  <div class='column_halves'>
    <p>Almost all characteristics of the typography can be altered with simple variaions to the query string. See the Config section for details on how to alter. For now enjoy some <del><?php echo LOREM ?></del></p>
  </div>
  <div class='column_halves end'>
    <p>At the end is a collection of <strong>long headings</strong> that should run across mulitple lines but never overlay. Before that is lots of <?php echo LOREM ?>. <a href="#text">Skip to Elements</a></p>
  </div>

  <hr />

  <div class='column_golden_small'>
     <p><?php echo LOREM ?></p>
  </div>
  <div class='column_golden_large end'>
    <hr />
&#1030;&#8362;&piv;&xi;&hearts;&#9833;&#9792;&#9836;&#9794;
    <hr /><hr /><hr /><hr /><hr /><hr />
  </div>

  <hr />

  <div class="column_golden_large">
    <blockquote><?php echo LOREM ?></blockquote>
  </div>
  <div class="column_golden_small end">
    <blockquote><p><?php echo LOREM ?></p></blockquote>
	<cite>A Wise Guy</cite>  
  </div>
  <hr />

  <div class="column_fifths"><p>Regular Paragraph <?php echo LOREM ?></p></div>
  <div class="column_fifths"><p><strong>Regular Paragraph with Strong <?php echo LOREM ?></strong></p></div>
  <div class="column_fifths"><p><em>Regular Paragraph with Emphasis <?php echo LOREM ?></em></p></div>
  <div class="column_fifths"><p><ins>Regular Paragraph with Insert <?php echo LOREM ?></ins></p></div>
  <div class="column_fifths end"><p><code>Regular Paragraph with Code <?php echo LOREM ?></code></p></div>

  <hr />

<!-- Test Elements -->
  <a id="test"></a>
  <h1>Basic block level elements</h1>
   
  <h1>&#60;h1&#62;This is 1nd level heading : The BIGGEST</h1>
  <p>&#60;p&#62;<?php echo LOREM ?></p>

  <h2>&#60;h2&#62;This is 2nd level heading</h2>
  <p>&#60;p&#62;<?php echo LOREM ?></p>

  <h3>&#60;h3&#62;This is 3rd level heading</h3>
  <p><?php echo LOREM ?></p>

  <h4>&#60;h4&#62;This is 4th level heading</h4>
  <p>&#60;p&#62;<?php echo LOREM ?></p>
  
  <h5>&#60;h5&#62;This is 5th level heading</h5>
  <p>&#60;p&#62;<?php echo LOREM ?></p>
  
  <h6>&#60;h6&#62;This is 6th level heading : The SMALLEST</h6>
  <p>&#60;p&#62;<?php echo LOREM ?></p>
  
  <address>This holds an &#60;address&#62;. Block level, but without margin or padding because they're often stacked.</address>
  
  <p>&#60;p&#62;<?php echo LOREM ?></p>
  
  <div>This is a <code>&#60;code&#62; div</code> element. Lorem ipsum dolor sit amet, elit, sed diam nonummy nibh euismod tincidunt ut consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. (End of <code>div</code>.)</div>

  <blockquote>This is a &#60;blockquote&#62; quotation!</blockquote>  

  <blockquote>
    <p>This is a &#60;p&#62; in a &#60;blockquote&#62; quotation containing a <em>single</em> paragraph.</p>
  </blockquote>

  <hr />

  <h1>Lists</h1>

<div class='column_thirds'>
  <p>This is a paragraph before an <strong>unnumbered</strong> list (<code>ul</code>).</p>

  <ul>
    <li>One.&#60;li&#62;</li>
    <li>Two.&#60;li&#62;</li>
    <li>Three. &#60;li&#62;. This list item should be longer. Note that for short items lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.</li>
    <li>Four. &#60;li&#62; This is the last item in this list. Let us terminate the list now without making any more fuss about it.</li>
  </ul>
</div>

<div class='column_thirds'>
  <p>This is a paragraph before a <strong>numbered</strong> list (<code>ol</code>). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".</p>

  <ol>
    <li>One &#60;li&#62;</li>
    <li>Two &#60;li&#62;</li>
    <li>Three &#60;li&#62; Well, probably this list item should be longer. Note that if items are short, lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.</li>
    <li>Four &#60;li&#62;</li>
    <li>Five &#60;li&#62;</li>
    <li>Six &#60;li&#62;</li>
    <li>Seven &#60;li&#62;</li>
    <li>Eight &#60;li&#62;</li>
    <li>Nine &#60;li&#62;</li>
    <li>Ten &#60;li&#62; This is the last item in this list. Let us terminate the list now without making any more fuss about it.</li>
  </ol>
</div>

<div class='column_thirds end'>
  <p>This is a paragraph before a <strong>definition</strong> list (<code>dl</code>). In principle, such a list should consist of <em>terms</em> and associated definitions.</p>

  <dl>
    <dt>Apple&#60;dt&#62;</dt>
    <dd>is a fruit.&#60;dd&#62;</dd>
    <dt>Banana&#60;dt&#62;</dt>
    <dd>Is also a fruit.&#60;dd&#62;</dd>
    <dt>Tomato&#60;dt&#62;</dt>
    <dd>Is debatable.&#60;dd&#62;</dd>
  </dl>
</div>

<hr />

  <a id="text"></a>
    <h1>Text-level semantics</h1>

  <p>
  The <a href="#">a element</a> example<br>

  The <abbr title="Title text">abbr element</abbr> example<br>
  The <b>b element</b> example<br>
  The <cite>cite element</cite> example<br>

  The <code>code element</code> example<br>
  The <del>del element</del> example<br>
  The <dfn>dfn element</dfn> example<br>

  The <em>em element</em> example<br>
  The <i>i element</i> example<br>
  The <ins>ins element</ins> example<br>

  The <kbd>kbd element</kbd> example<br>
  The <mark>mark element</mark> example<br>
  The <q>q element <q>inside</q> a q element</q> example<br>

  The <samp>samp element</samp> example<br>
  The <small>small element</small> example<br>
  The <span>span element</span> example<br>

  The <strong>strong element</strong> example<br>
  The <sub>sub element</sub> example<br>
  The <sup>sup element</sup> example<br>

  The <var>var element</var> example<br>
  The <u>u element</u> example
  </p>
  <ul>
    <li> <abbr title="Cascading Style Sheets">CSS</abbr> (an abbreviation; <code>abbr</code> markup used)</li>
    <li> <acronym title="radio detecting and ranging">radar</acronym> (an acronym; <code>acronym</code> markup used)</li>

    <li> <cite>Origin of Species</cite> (a book title; <code>cite</code> markup used)</li>
    <li> <code>a[i] = b[i] + c[i);</code> (computer code; <code>code</code> markup used)</li>

    <li> an <dfn>octet</dfn> is an entity consisting of eight bits (<code>dfn</code> markup used for the term being defined)</li>
    <li> this is <em>very</em> simple (<code>em</code> markup used for emphasizing a word)</li>

    <li> type <kbd>yes</kbd> when prompted for an answer (<code>kbd</code> markup used for text indicating keyboard input)</li>
    <li> <q>Hello!</q> (<code>q</code> markup used for quotation)</li>

    <li> He said: <q>She said <q>Hello!</q></q> (a quotation inside a quotation)</li>
    <li> you may get the message <samp>Core dumped</samp> at times (<code>samp</code> markup used for sample output)</li>

    <li> <strong>this is highlighted text</strong> (<code>strong</code> markup used)</li>
  
    <li> <tt>text in monospace font</tt> (<code>tt</code> markup used)</li>

    <li> the command <code>cat</code> <var>filename</var> displays the file specified by the <var>filename</var> (<code>var</code> markup used to indicate a word as a variable).</li>

    <li> In order to test how subscripts and superscripts (<code>sub</code> and <code>sup</code> markup) work inside running text, we need some dummy text around constructs like x<sub>1</sub> and H<sub>2</sub>O (where subscripts occur). So here is some fill so that you will (hopefully) see whether and how badly the subscripts and superscripts mess up vertical spacing between lines. Now superscripts: M<sup>lle</sup>, 1<sup>st</sup>, and then some mathematical notations: e<sup>x</sup>, sin<sup>2</sup> <i>x</i>, and some nested superscripts (exponents) too: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </li>

  </ul>
  
  <p>Some of the elements tested above are typically displayed in a monospace font, often using the <em>same</em> presentation for all of them. This tests whether that is the case on your browser:</p>
  
  <ul>
    <li><code>This is sample text inside code markup</code></li>
    <li><kbd>This is sample text inside kbd markup</kbd></li>
    <li><samp>This is sample text inside samp markup</samp></li>
    <li><tt>This is sample text inside tt markup</tt></li>
  </ul>

  <a id="other"></a><h6>Other Elements</h6>
  <p>This next bit shows that <em>PREformatted text</em> is working.</p>
  
<pre>
	  1
	2
      3
    4
  5
</pre>

<p><?php echo LOREM ?></p>







<?php 

// Test

?>   
 
<header>
<h1>Test Suite</h1>
	  <hgroup>
		  <h1>Grouped Heading 1</h1>
		  <h2>Grouped Heading 2</h2>

	  </hgroup>
	  <nav>
		  <ul>
			  <li><a href="#">navigation item #1</a></li>
			  <li><a href="#">navigation item #2</a></li>
			  <li><a href="#">navigation item #3</a></li>
		  </ul>

	  </nav>
  </header>

  <h1>Heading 1</h1>
  <h2>Heading 2</h2>
  <h3>Heading 3</h3>
  <h4>Heading 4</h4>
  <h5>Heading 5</h5>

  <h6>Heading 6</h6>

  <section>
	  <h1>Section Heading 1</h1>            
	  <article>
		  <h4>Article Heading 2</h4>
		  <address>Address: somewhere, world</address>
		  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.</p>

		  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.</p>
	  </article>
  </section>



  <h1>Grouping content</h1>

  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et m.</p>


  <h3>pre</h3>

  <pre>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et me.</pre>
  <pre><code>&lt;html></code>
  <code>&lt;head></code>
  <code>&lt;/head></code>
  <code>&lt;body></code>

  <code>&lt;div class="main"> &lt;div></code>
  <code>&lt;/body></code>
  <code>&lt;/html></code></pre>

  <h3>blockquote</h3>

  <blockquote>
	  <p>Some sort of famous witty quote marked up with a &lt;blockquote> and a child &lt;p> element.</p>

  </blockquote>

  <blockquote>Even better philosophical quote marked up with just a &lt;blockquote> element.</blockquote>

  <h3>ordered list</h3>

  <ol>
	  <li>list item 1</li>
	  <li>list item 1
		  <ol>

			  <li>list item 2</li>
			  <li>list item 2
				  <ol>
					  <li>list item 3</li>
					  <li>list item 3</li>
				  </ol>
			  </li>
			  <li>list item 2</li>

			  <li>list item 2</li>
		  </ol>
	  </li>
	  <li>list item 1</li>
	  <li>list item 1</li>
  </ol>

  <h3>unordered list</h3>


  <ul>
	  <li>list item 1</li>
	  <li>list item 1
		  <ul>
			  <li>list item 2</li>
			  <li>list item 2
				  <ul>
					  <li>list item 3</li>

					  <li>list item 3</li>
				  </ul>
			  </li>
			  <li>list item 2</li>
			  <li>list item 2</li>
		  </ul>
	  </li>

	  <li>list item 1</li>
	  <li>list item 1</li>
  </ul>

  <h3>description list</h3>

  <dl>
	  <dt>Description name</dt>
	  <dd>Description value</dd>

	  <dt>Description name</dt>
	  <dd>Description value</dd>
	  <dd>Description value</dd>
	  <dt>Description name</dt>
	  <dt>Description name</dt>
	  <dd>Description value</dd>

  </dl>

  <h3>figure</h3>

  <figure>
	  <img src="http://placehold.it/400x<?php echo $outputVars['baseline']*10; ?>" alt="embedded image test">
	  <figcaption>Figcaption content</figcaption>
  </figure>

  <h1>Tabular data</h1>


  <table summary="Jimi Hendrix albums">
	  <caption>Jimi Hendrix - albums</caption>
	  <thead>
		  <tr>
			  <th>Album</th>
			  <th>Year</th>
			  <th>Price</th>

		  </tr>
	  </thead>
	  <tfoot>
		  <tr>
			  <th>Album</th>
			  <th>Year</th>
			  <th>Price</th>

		  </tr>
	  </tfoot>
	  <tbody>
		  <tr>
			  <td>Are You Experienced</td>
			  <td>1967</td>
			  <td>$10.00</td>

		  </tr>
		  <tr>
			  <td>Axis: Bold as Love</td>
			  <td>1967</td>
			  <td>$12.00</td>
		  </tr>
		  <tr>

			  <td>Electric Ladyland</td>
			  <td>1968</td>
			  <td>$10.00</td>
		  </tr>
		  <tr>
			  <td>Band of Gypsys</td>
			  <td>1970</td>

			  <td>$12.00</td>
		  </tr>
	  </tbody>
  </table>

  <h1>Forms</h1>

  <form>
	  <fieldset>
		  <legend>Inputs as descendents of labels (form legend)</legend>

		  <p><label>Text input <input type="text" value="default value"></label></p>
		  <p><label>Email input <input type="email"></label></p>
		  <p><label>Search input <input type="search"></label></p>
		  <p><label>Tel input <input type="tel"></label></p>
		  <p><label>URL input <input type="url" placeholder="http://"></label></p>
		  <p><label>Password input <input type="password" value="password"></label></p>

		  <p><label>File input <input type="file"></label></p>
		  
		  <p><label>Radio input <input type="radio" name="rad"></label></p>
		  <p><label>Checkbox input <input type="checkbox"></label></p>
		  <p><label><input type="radio" name="rad"> Radio input</label></p>
		  <p><label><input type="checkbox"> Checkbox input</label></p>

		  
		  <p><label>Select field <select><option>Option 01</option><option>Option 02</option></select></label></p>
		  <p><label>Textarea <textarea cols="30" rows="5" >Textarea text</textarea></label></p>
	  </fieldset>
	  
	  <fieldset>
		  <legend>Inputs as siblings of labels</legend>
		  <p><label for="ic">Color input</label> <input type="color" id="ic" value="color"></p>

		  <p><label for="in">Number input</label> <input type="number" id="in" min="0" max="10" value="5"></p>
		  <p><label for="ir">Range input</label> <input type="range" id="ir" value="range"></p>
		  <p><label for="idd">Date input</label> <input type="date" id="idd" value="date"></p>
		  <p><label for="idm">Month input</label> <input type="month" id="idm" value="month"></p>
		  <p><label for="idw">Week input</label> <input type="week" id="idw" value="week"></p>

		  <p><label for="idt">Datetime input</label> <input type="datetime" id="idt" value="datetime"></p>
		  <p><label for="idtl">Datetime-local input</label> <input type="datetime-local" id="idtl" value="datetime-local"></p>

		  <p><label for="irb">Radio input</label> <input type="radio" id="irb" name="rad"></p>
		  <p><label for="icb">Checkbox input</label> <input type="checkbox" id="icb"></p>

		  <p><input type="radio" id="irb2" name="rad"> <label for="irb2">Radio input</label></p>
		  <p><input type="checkbox" id="icb2"> <label for="icb2">Checkbox input</label></p>
		  
		  <p><label for="s">Select field</label> <select id="s"><option>Option 01</option><option>Option 02</option></select></p>
		  <p><label for="t">Textarea</label> <textarea id="t" cols="30" rows="5" >Textarea text</textarea></p>

	  </fieldset>
	  
	  <fieldset>
		  <legend>Clickable inputs and buttons</legend>
		  <p><input type="image" src="http://placehold.it/90x24" alt="Image (input)"></p>
		  <p><input type="reset" value="Reset (input)"></p>
		  <p><input type="button" value="Button (input)"></p>
		  <p><input type="submit" value="Submit (input)"></p>

		  <p><button type="reset">Reset (button)</button></p>

		  <p><button type="button">Button (button)</button></p>
		  <p><button type="submit">Submit (button)</button></p>
	  </fieldset>
	  
	  <fieldset id="boxsize">
		  <legend>box-sizing tests</legend>
		  <div><input type="text" value="text"></div>
		  <div><input type="email" value="email"></div>

		  <div><input type="search" value="search"></div>
		  <div><input type="url" value="http://"></div>
		  <div><input type="password" value="password"></div>

		  <div><input type="color" value="color"></div>
		  <div><input type="number" value="number"></div>
		  <div><input type="range" value="range"></div>
		  <div><input type="date" value="date"></div>
		  <div><input type="month" value="month"></div>

		  <div><input type="week" value="week"></div>
		  <div><input type="datetime" value="datetime"></div>
		  <div><input type="datetime-local" value="datetime-local"></div>
		  
		  <div><input type="radio"></div>
		  <div><input type="checkbox"></div>
		  
		  <div><select><option>Option 01</option><option>Option 02</option></select></div>
		  <div><textarea cols="30" rows="5" >Textarea text</textarea></div>

		  
		  <div><input type="image" src="http://placehold.it/90x24" alt="Image (input)"></div>
		  <div><input type="reset" value="Reset (input)"></div>
		  <div><input type="button" value="Button (input)"></div>
		  <div><input type="submit" value="Submit (input)"></div>

		  <div><button type="reset">Reset (button)</button></div>
		  <div><button type="button">Button (button)</button></div>
		  <div><button type="submit">Submit (button)</button></div>

	  </fieldset>
  </form>

<?php 

// create a p with lorem for all .fontSizes!

?>    

<hr />

<h1>This is 1nd level heading <?php echo LOREM ?></h1>
<h2>This is 2nd level heading <?php echo LOREM ?></h2>
<h3>This is 3rd level heading <?php echo LOREM ?></h3>
<h4>This is 4th level heading <?php echo LOREM ?></h4>
<h5>This is 5th level heading <?php echo LOREM ?></h5>
<h6>This is 6th level heading <?php echo LOREM ?></h6>

<hr />

	<footer>
		<hr />
		<small>TIP : Use this as a replacement for your current reset.css file!</small>
		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml11.png" alt="Valid XHTML 1.0!" height="31" width="88" /></a>
		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-css2.png" alt="Valid CSS 2.0!" height="31" width="88" /></a>
  	</footer>
<?php /**/ ?> 	
</div>
  

</div>

 <?php /* ==-- jQuery & demo script--== */ ?>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
  <script src="js/test.js"></script>
  <script>window.jQuery || document.write("<script src='js/jquery-1.6.1.min.js'>\x3C/script>")</script>

</body>

</html>